function GetWarn_Report() {

    var store = new Ext.data.JsonStore({
        fields: [{name: 'year'},{name: 'x'},{name: 'y'},{name: 'z',type: 'int'}],
        data: [
        {year: '2010-01',x: 5,y: 3,z: 6},
        {year: '2010-02',x: 3,y: 3,z: 1},
        {year: '2010-03',x: 4,y: 4,z: 2},
        {year: '2010-04',x: 5,y: 2,z: 3},
        {year: '2010-05',x: 6,y: 7,z: 1},
        {year: '2010-06',x: 7,y: 2,z: 2},
        {year: '2010-07',x: 8,y: 3,z: 9},
        {year: '2010-08',x: 8,y: 6,z: 9}
        ]
    })

	var flowPanel = new Ext.Panel({
				width : 800,
				height : 600,
				region : 'center',
				layout : 'fit',
				split : true,

				items : {
					    xtype: 'stackedcolumnchart',
					    store: store,
					    xField: 'year',
					    xAxis: new Ext.chart.CategoryAxis({
					        title: '时间'
					    }),
					    yAxis: new Ext.chart.NumericAxis({
					        title: "警告次数"
					    }),
					    series: [{
					        displayName: "高危",
					        yField: 'x'
					    },
					    {
					        displayName: "中危",
					        yField: 'y'
					    },
					    {
					        displayName: "低危",
					        yField: 'z'
					    }],
					    chartStyle: {
					        padding: 10,
					        legend: {
					            display: 'right'
					        }
					    }
				},
				tbar : [{
							text : '统计条件',
							tooltip : '统计条件',
							iconCls : 'refresh',
							handler : function() {							
								WarnReportSearchWindows(SearchReturn);
							}
						}]
			});
	function SearchReturn(data){
		var jsondata = Ext.util.JSON.decode(data);
		
	}

	return flowPanel;
}

function WarnReportSearchWindows(SearchReturn){

	var urlData = [
			['1', 'test1', 'mysql select 预警', '启用'],
			['2', 'test2', 'mysql select 预警', '启用'],
			['3', 'test3', 'mysql select 预警', '启用'],
			['4', 'test4', 'mysql select 预警', '启用'],
			['5', 'test5', 'mysql select 预警', '启用']
	];


	var urlStore = new Ext.data.ArrayStore({
				fields : [{
							name : 'id'
						}, {
							name : 'name'
						}, {
							name : 'url'
						}, {
							name : 'property'
						}]
			});

	urlStore.loadData(urlData);
	var sm = new Ext.grid.CheckboxSelectionModel();
	var urlgrid = new Ext.grid.GridPanel({
				store : urlStore,
				columns : [sm, {
							id : 'id',
							header : 'id',
							width : 10,
							sortable : true,
							dataIndex : 'id',
							hidden : true
						}, {
							header : '策略名',
							width : 100,
							sortable : true,
							dataIndex : 'name'
						}, {
							header : '描述',
							width : 100,
							sortable : true,
							dataIndex : 'url'
						}, {
							header : '状态',
							width : 100,
							sortable : true,
							dataIndex : 'property'
						}],
				sm : sm,
				stripeRows : true,
				autoExpandColumn : 'id',
				region : 'center'

			});
			
	var bookTplMarkup = [
		'策略名: {name}<br/>',
		'描述: {url}<br/>',
		'状态: {property}<br/>'
	];
	var bookTpl = new Ext.Template(bookTplMarkup);

	var Search = new Ext.form.FormPanel({
				frame : true,
				layout : 'form',
				region : 'center',
				xtype : 'fieldset',
				bodyStyle : 'padding:0px;',
				items : [{
							xtype : 'checkboxgroup',
							fieldLabel : '起始时间',
							name : 'start',
							id : 'start',
							columns : 2,
							vertical : true,
							items : [{
										xtype : 'datefield',
										name : 'startdate',
										id   : 'startdate',
										format: 'Y-m-d',
										value:'${startdate}'
									}, {
										xtype : 'timefield',
										name : 'starttime',
										id   : 'starttime',
										value:'00:00',
										format: 'H:i'
	
									}]
						},{
							xtype : 'checkboxgroup',
							fieldLabel : '结束时间',
							name : 'end',
							id : 'end',
							columns : 2,
							vertical : true,
							items : [{
										xtype : 'datefield',
										name : 'enddate',
										id   : 'enddate',
										format: 'Y-m-d',
										value:'${startdate}'
									}, {
										xtype : 'timefield',
										name : 'endtime',
										id   : 'endtime',
										value:'00:00',
										format: 'H:i'
									}]
						}, {
			        bodyStyle: 'padding-left:5px;',
			        items: {
			            xtype: 'fieldset',
			            title: '策略',
			            height : 200,
			            frame : true,
									layout : 'border',
			            items: [urlgrid]
			        	}
			    	},
			            {
										id: 'detailPanel',
										region: 'center',
										bodyStyle: {
											background: '#DFE8F6',
											padding: '7px'
										},
										html: ''
									}
						]

			});

	urlgrid.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
		var detailPanel = Ext.getCmp('detailPanel');
		bookTpl.overwrite(detailPanel.body, r.data);
	});

	var searchWindows = new Ext.Window({
				layout : 'border',
				width : 500,
				height : 410,
				title : "查找",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'search',
				items : [Search],
				plain : true
			});
	searchWindows.addButton({
				text : "查找",
				handler : function() {
					var data = "{startdate:'" + Ext.get("startdate").getValue() + "',enddate:'" + Ext.get("enddate").getValue() + "',context:'" + Ext.get("context").getValue() + "'}";
					SearchReturn(data)
					searchWindows.close();
				}
			});
	searchWindows.addButton({
				text : '取 消',
				handler : function() {
					searchWindows.close();
				}
			});
	searchWindows.show();
}